import java.io.IOException;

public class Main {
	public static void main(String[] args) throws IOException {
		
		CityDB db = new CityDB();
		
		/* This first puzzle is easy to solve.
		   1 4 2
		   3   5
		   6 7 8 */
		int[] puzzle = {1, 4, 2, 3, 0, 5, 6, 7, 8};
		
		SlidingPuzzle start = new SlidingPuzzle(puzzle);
		SlidingPuzzle goal = new SlidingPuzzle(start.getSize());
		
		//StateWithHeuristic start = db.get("Seattle, WA");
		//StateWithHeuristic goal = db.get("Austin, TX");
		//AStarSearch.solve(start, goal);
		//UniformCostSearch.solve(start, goal);
		//GreedyBestFirstSearch.solve(start, goal);
		AStarSearch.solve(start, goal);
	}
}